<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html" />
<title>用户管理{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html" />
<include file="Public/ADMIN/HTML/Left_list/student_left_list.html" />
  <style type="text/css">
          .p{
            height:100px;
            width: 50%;
            position: absolute;
            left: 40%;
          }
              .pages a,  
            .pages span {  
                display: inline-block;  
                padding: 2px 5px;  
                margin: 2 3px;  
                border: 1px solid #f0f0f0;  
                -webkit-border-radius: 3px;  
                -moz-border-radius: 3px;  
                border-radius: 3px;  
            }  
              
            .pages a,  
            .pages li {  
                display: inline-block;  
                list-style: none;  
                text-decoration: none;  
                color: #58A0D3;  
            }  
              
            .pages a.first,  
            .pages a.prev,  
            .pages a.next,  
            .pages a.end {  
                margin:0;  
            }  
              
            .pages a:hover {  
                border-color: #50A8E6;  
            }  
              
            .pages span.current {  
            	
                background: #50A8E6;  
                color: #FFF;  
                font-weight: 700;  
                border-color: #50A8E6;  
            }  
          </style>
<!-- DataTables Example -->
<script>
	
    function delStu(xid){ 
			var gradename = xid;
			address = "{$Think.const.DOMAIN_NAME}Admin/Users/studentDel/id/"+gradename; // 设置$.get调用路径
			var delTr = document.getElementById(xid);                                  // 获取动态的表格ID
			$.get(address,function(str){                                               // 方法不太明白，大概意思是获取$.get返回的值
			if(str==0){                                                                // 如果返回的时0的话就证明是对的
				ZENG.msgbox.show("删除成功！", 4, 1000);
				delTr.parentNode.removeChild(delTr);                                   // 删除该行
			}else{                                                                     // 其他情况都是原密码错误
			    
				ZENG.msgbox.show("删除失败！该同学可能有评论信息，不能删除！", 5, 2000);
			}
		    });	 
	}
</script>
<div class="container-fluid main-content">
	<!-- DataTables Example -->
	<div class="row">
		<div class="col-lg-10">
			<div class="widget-container fluid-height clearfix">
				<div class="heading">
					<i class="icon-plus-sign-alt"></i>用户列表
				</div>

                <div>
            
            <form method="post" action="__SELF__">
            <div>
            	 <input type="text" name="name" placeholder="           姓名  ||   学号    ||真名" align="center" style="margin-left: 55%;height: 40px; width:36%;border-radius: 10px; position: relative;">
              <input type="submit" class="btn btn-primary" style="height:40px;position: relative;" >
            </div>
             
            </form>
             
          </div>

				<div class="widget-content padded clearfix">
					<table class="table table-bordered table-striped"
						id="datatable-editable">
						<thead>
							<th style="width: 8%; text-align: center">编号</th>
							<th style="width: 8%; text-align: center">头像</th>
							<th style="width: 12%; text-align: center">用户名</th>
							<th style="width: 10%; text-align: center">姓名</th>
							<th style="width: 10%; text-align: center">学号/工号</th>
							<th style="width: 12%; text-align: center">邮箱</th>
							<th style="width: 12%; text-align: center">电话</th>
							<th style="width: 20%; text-align: center">注册时间</th>
							<th style="width: 8%; text-align: center">操作</th>
						</thead>
						<tbody>
							<volist name="info" id="vo">
							<tr id="{$vo.uid}">
								<td style="text-align: center;">{$number++}</td>
								<td style="text-align: center;"><img
									src="{$Think.const.RESOURCES}UPLOADS/photo/{$vo.photo}"
									style="width: 30px; height: 30px;" /></td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.username}</td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.realname}</td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.stunum}</td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.email}</td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.phone}</td>
								<td class="hidden-xs" style="text-align: center;">
									{$vo.regdate}</td>
								<td class="actions"
									style="margin: 0 0 0 20px; text-align: center;">
									<div class="action-buttons">
										<a class="table-actions"
											href="{$Think.const.DOMAIN_NAME}Admin/Users/studentModify/id/{$vo.uid}"><i
											class="icon-pencil" title="修改" style="margin-left: -9%"></i></a>
										<a class="delete-row2" href="javascript:void(0);"
											onclick="if(confirm('确定要删除吗?')==false){  return false;}else{ javascript:delStu({$vo.uid})};"><i
											class="icon-trash" title="删除" style="margin-left: 26%"></i></a>
									</div>
								</td>
							</tr>
							</volist>
						</tbody>
					</table>
                    <div>
                    	
                    </div>
				</div>
			</div>
		</div>
	</div>
	<!-- end DataTables Example -->
<div class="p">
<div class="pages" >
	{$page}
</div>	
</div>

</div>
</div>
</body>
</html>
